home *** CD-ROM | disk | FTP | other *** search
/ The Genius of Edison / The Genius of Edison (Version 1.0)(Softkey Multimedia)(GOE744AE-CD)(1996).ISO / pc / data / shared.cst / 00106_Script_106 < prev    next >
Text File  |  1996-09-03  |  2KB  |  69 lines

  1. -- handler relinkToNewCast relinks members used in the score from cast oldCast to cast newCast.
  2.  
  3. on listSpritesInCast newCast,channelsToCheck
  4.   
  5.   
  6.   --  check all sprites if none specified
  7.   if voidP(channelsToCheck) then
  8.     set channelsToCheck = []
  9.     repeat with index = 1 to 48
  10.       add(channelsToCheck,index)
  11.     end repeat
  12.   end if
  13.   
  14.   set lastFrame = the lastFrame
  15.   
  16.   repeat with currentFrame = 1 to lastFrame
  17.     go frame currentFrame
  18.     
  19.     repeat with currSprite in channelsToCheck
  20.       -- check if sprite contains cast
  21.       if the memberNum of sprite currSprite <> 0 then
  22.         -- if member exists in newCast then relink to new cast
  23.         if memberInCast(currSprite,newCast) then
  24.           -- relinkSpriteToCast(currSprite,newCast)
  25.           -- show where what is relinked
  26.           put "Frame "¤tFrame&" Sprite "&currSprite&" Member: "& the name of member the memberNum of sprite currSprite of castLib newCast &" in "& newCast
  27.         end if
  28.       end if
  29.     end repeat
  30.     
  31.   end repeat
  32.   
  33. end
  34.  
  35. -- handler memberInNewCast returns TRUE if member aMember is in cast aCast, FALSE if it is not
  36.  
  37. on memberInCast aSprite,aCast
  38.   return the name of castLib (the castLibNum of sprite aSprite) = aCast
  39. end
  40.  
  41.  
  42. -- handler relinkSpriteToCast links member aMember to cast aCast
  43. --
  44. --on relinkSpriteToCast aSprite,aCast
  45. --  -- find the number of the member in the oldCast
  46. --  set memberNum = the number of member (the member of sprite aSprite)
  47. --  
  48. --  -- find the number of the member with the same name in the new cast
  49. --  set memberNumInCast = the number of member(the name of member memberNum) of cast aCast
  50. --  
  51. --  -- link the sprite to the new member in the new cast
  52. --  set the castLibNum of sprite aSprite to member memberNum of castLib aCast
  53. --end  
  54.  
  55.  
  56.  
  57. on hideBackButtonFirstVisitToWheel
  58.   global wheelAlreadyVisited , backCoverUpSprite
  59.   if voidP(wheelAlreadyVisited) then
  60.     set the visible of sprite backCoverUpSprite = TRUE
  61.     set wheelAlreadyVisited = true
  62.   else
  63.     set the visible of sprite backCoverUpSprite = FALSE
  64.   end if
  65.   
  66. end
  67.  
  68.  
  69.